import base64

with open("./SF-CSIM-EXPRESS-SDK指南.pdf", "rb") as file:
    encode_string = base64.b64encode(file.read())

# print(encode_string)

with open("./result.txt", "wb") as file:
    file.write(encode_string)